package com.probiz.estore.system.dao;

import java.util.List;

import com.probiz.estore.common.model.system.PaymentMethod;
import com.probiz.estore.core.dao.GenericDao;

/**
 * PaymentMethod Data Access Object (DAO) interface. Developer introduced interfaces should be declared here. Won't get overwritten.
 */
public interface PaymentMethodDao extends GenericDao<PaymentMethod> {
	/**
	 * 更新支付方式状态
	 * 
	 * @param paymentMethodId
	 * @param status
	 */
	public void updatePaymentMethodStatus(Integer paymentMethodId, Short status);

	/**
	 * 根据状态字符串获得支付方式
	 * 
	 * @param pb
	 * @return
	 */
	public List<PaymentMethod> findAllByStatus(String statusArr);

	/**
	 * 根据支付类型获得支付方式列表
	 * 
	 * @param paymentType
	 * @return
	 */
	public List<PaymentMethod> getByPaymentMethodType(Short paymentType);

	/**
	 * 根据支付类型和状态获得支付方式列表
	 * 
	 * @param paymentType
	 *            online or offline
	 * @param status
	 *            active/inative/deleted
	 * @return List<PaymentMethod>
	 */
	public List<PaymentMethod> getByPaymentMethodTypeStatus(Short paymentType, Short status);

	/**
	 * 获得当前最大排序值
	 * @return
	 */
	public Integer getMaxSortOrder();
	/**
	 * 根据支付网关获得支付方式
	 * @param paymentGatewayId
	 * @return
	 */
	public PaymentMethod getByPaymentGatewayId(Integer paymentGatewayId);
	
	/**
	 * 根据网关类型和支付状态获得在线支付方式列表
	 * @param paymentGatewayType 网关类型 0:pc支付，1:mobile支付
	 * @param status
	 * @return
	 */
	public List<PaymentMethod> getOnlinePaymentMethodByPaymentGatewayTypeStatus(Short paymentGatewayType, Short status);
}
